#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int N = 0;
	scanf("%d", &N);
	while (N != 1)
	{
		if (N % 2 == 1)
		{
			
			printf("%d*3+1=%d\n", N,N * 3 + 1 );
			N = (N * 3 + 1);
		}
		else
		{
			printf("%d/2=%d\n", N, N / 2);
			N = N / 2;
		}
	}
	printf("END");
	
	return 0;
}